package cn.tedu.strawdemo.portal.controller;


import cn.tedu.strawdemo.portal.model.User;
import cn.tedu.strawdemo.portal.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author tedu.cn
 * @since 2021-12-28
 */
@RestController
@RequestMapping("/portal/user")
public class UserController {

    @Autowired
    IUserService userService;

    @GetMapping("id")
    public User getUser(){
        return userService.getById(1);
    }

}
